# Copyright (c) 2018 Presto Labs Pte. Ltd.
# Author: inkyu, jaewon

import os
from coin.exchange.okex_futures.kr_rest.futures_product import OkexFuturesProduct
from coin.exchange.huobi_futures.kr_rest.futures_product import HuobiFuturesProduct
from coin.strategy.tool.monitor.config_v1_fut import LMAGG_FUTS

STRATEGIES = [
    {
        'name': 'lm-agg.huobi_btc_usdt',
        'group': 'lm-agg.btc_usdt',
        'log_path': ('~/data/log/'
                     'strategy-02.ap-northeast-1.huobi/log_huobi_lm_agg_btc_usdt'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'USDT',
        'quote': 'USDT',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.huobi_eth_usdt',
        'group': 'lm-agg.eth_usdt',
        'log_path': ('~/data/log/'
                     'strategy-15.ap-northeast-1.huobi/log_huobi_lm_agg_eth_usdt'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'USDT',
        'quote': 'USDT',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.huobi_eos_usdt',
        'group': 'lm-agg.eos_usdt',
        'log_path': ('~/data/log/'
                     'strategy-02.ap-northeast-1.huobi/log_huobi_lm_agg_eos_usdt'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'USDT',
        'quote': 'USDT',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.huobi_bchabc_usdt',
        'group': 'lm-agg.huobi_spot',
        'log_path': ('~/data/log/strategy-15.ap-northeast-1.huobi/'
                     'log_huobi_lm_agg_bchabc_usdt'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'USDT',
        'quote': 'USDT',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.huobi_ltc_xrp_usdt',
        'group': 'lm-agg.huobi_spot',
        'log_path': ('~/data/log/strategy-17.ap-northeast-1.huobi/'
                     'log_huobi_lm_agg_ltc_xrp_usdt'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'USDT',
        'quote': 'USDT',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.okex_btc_eos_eth_usdt',
        'group': 'lm-agg.okex_spot',
        'log_path': ('~/data/log/'
                     'server-01.aliyun-cn-hongkong.okex/log_okex_lm_agg_btc_eos_eth_usdt'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'USDT',
        'quote': 'USDT',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.okex_ltc_xrp_usdt',
        'group': 'lm-agg.okex_spot',
        'log_path': ('~/data/log/server-01.aliyun-cn-hongkong.okex/'
                     'log_okex_lm_agg_ltc_xrp_usdt'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'USDT',
        'quote': 'USDT',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.upbit_bchabc_btc_eos_eth',
        'group': 'lm-agg.upbit_spot',
        'log_path': ('~/data/log/strategy-03.ap-northeast-2/'
                     'log_upbit_lm_agg_bchabc_btc_eos_eth_krw'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'KRW',
        'quote': 'KRW',
        'spot_mode': True,
    },
    {
        'name': 'RETIRED.lm-agg.korbit_bchabc_btc_eth_xrp',
        'group': 'lm-agg.korbit_spot',
        'log_path': ('~/data/log/strategy-28.ap-northeast-2/'
                     'log_korbit_lm_agg_bchabc_btc_eth_xrp_krw'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'USDT',
        'quote': 'KRW',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.binance_btc_usdt',
        'group': 'lm-agg.btc_usdt',
        'log_path': ('~/data/log/'
                     'strategy-04.ap-northeast-1/log_binance_lm_agg_btc_usdt'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'USDT',
        'quote': 'USDT',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.binance_eth_usdt',
        'group': 'lm-agg.eth_usdt',
        'log_path': ('~/data/log/'
                     'strategy-04.ap-northeast-1/log_binance_lm_agg_eth_usdt'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'USDT',
        'quote': 'USDT',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.binance_bchabc_eos_usdt',
        'group': 'lm-agg.binance_spot',
        'log_path': ('~/data/log/'
                     'strategy-04.ap-northeast-1/log_binance_lm_agg_bchabc_eos_usdt'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'USDT',
        'quote': 'USDT',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.bithumb_btc_eos_eth',
        'group': 'lm-agg.bithumb_spot',
        'log_path': ('~/data/log/'
                     'strategy-17.ap-northeast-2/log_bithumb_lm_agg_btc_eos_eth_krw'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'KRW',
        'quote': 'KRW',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.bithumb_xrp',
        'group': 'lm-agg.bithumb_spot',
        'log_path': ('~/data/log/'
                     'strategy-12.ap-northeast-2/log_bithumb_lm_agg_xrp_krw'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'KRW',
        'quote': 'KRW',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.bithumb_bchabc',
        'group': 'lm-agg.bithumb_spot',
        'log_path': ('~/data/log/strategy-13.ap-northeast-2/'
                     'log_bithumb_lm_agg_bchabc_krw'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'KRW',
        'quote': 'KRW',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.huobi_eth_btc',
        'group': 'lm-agg.btc_quote',
        'log_path': ('~/data/log/strategy-17.ap-northeast-1.huobi/'
                     'log_huobi_lm_agg_eth_btc'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'BTC',
        'quote': 'BTC5',
        'spot_mode': True,
    },
    {
        'name': 'lm-agg.okex_eos_eth_ltc_btc',
        'group': 'lm-agg.btc_quote',
        'log_path': ('~/data/log/server-01.aliyun-cn-hongkong.okex/'
                     'log_okex_lm_agg_eos_eth_ltc_btc'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'BTC',
        'quote': 'BTC5',
        'spot_mode': True,
    },
    {
        'name': 'RETIRED.lm-agg.bitflyer-fxbtcjpy',
        'group': 'lm-agg.bitflyer-fxbtcjpy',
        'log_path': ('~/data/log/'
                     'strategy-03.ap-northeast-1/log_bitflyer-fxbtcjpy.lm-pass'),
        'fill_collector': 'fill_collector',
        'balance_marker': 'Total',
        'position_marker': 'BTC-JPY.PERPETUAL.Bitflyer.FX_BTC_JPY',
        'quote': 'JPY',
        'owner': 'jhkim',
    },
    {
        'name': 'lm-agg.bitflyer-fxbtcjpy',
        'group': 'lm-agg.bitflyer-fxbtcjpy',
        'log_path': ('~/data/log/'
                     'strategy-03.ap-northeast-1/log_bitflyer-fxbtcjpy.lm-agg'),
        'fill_collector': 'fill_collector',
        'balance_marker': 'Total',
        'position_marker': 'BTC-JPY.PERPETUAL.Bitflyer.FX_BTC_JPY',
        'quote': 'JPY',
        'owner': 'jhkim',
    },
    {
        'name': 'lm-agg.quoinex-btcjpy',
        'group': 'lm-agg.quoinex-btcjpy',
        'log_path': ('~/data/log/'
                     'strategy-03.ap-northeast-1/log_quoinex-btcjpy.lmagg'),
        'fill_collector': 'csv',
        'balance_marker': 'Total',
        'position_marker': 'BTC',
        'quote': 'JPY',
        'owner': 'jhkim',
        'spot_mode': True,
    },
]

for elem in STRATEGIES:
  if isinstance(elem, dict):
    elem['owner'] = 'chensili'

STRATEGIES = LMAGG_FUTS + STRATEGIES

for elem in STRATEGIES:
  if isinstance(elem, dict):
    elem['log_path'] = os.path.expanduser(elem['log_path'])
